import 'package:example/app/modules/main_module/home_page/components/body.dart';
import 'package:example/app/routes/app_pages.dart';
import 'package:flutter/material.dart';
import 'package:example/index.dart';

class HomePage extends StatefulWidget {
  @override
  _HomePageState createState() => _HomePageState();
}

class _HomePageState extends State<HomePage>
    with AutomaticKeepAliveClientMixin {

  @override
  Widget build(BuildContext context) {
    super.build(context);
    return Scaffold(
      appBar: AppBar(
        title: Text('首页'),
        centerTitle: true,
        actions: [
          IconButton(
            onPressed: () => Get.toNamed(Routes.SEARCH),
            icon: Icon(Icons.search_outlined),
          ),
        ],
      ),
      body: Body(),
    );
  }

  @override
  bool get wantKeepAlive => true;
}
